/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: qian
 * Date: 2022-06-29
 * Time: 16:54
 */
public class TestDemo {
    public static void main2(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        System.out.println(myLinkedList.size());
        myLinkedList.addLast(1);
        myLinkedList.display();
        myLinkedList.remove(1);
        myLinkedList.display();
    }
    public static void main(String[] args) throws MyLinkedListIndexOutofException {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.addFirst(11);
        myLinkedList.addFirst(12);
        myLinkedList.addFirst(13);
        myLinkedList.addFirst(14);
        myLinkedList.display();
        myLinkedList.addLast(21);
        myLinkedList.addLast(22);
        myLinkedList.addLast(23);
        myLinkedList.addLast(24);
        myLinkedList.display();
        System.out.println(myLinkedList.size());
        myLinkedList.addIndex(0,0);
        myLinkedList.addIndex(3,0);
        myLinkedList.addIndex(10,0);
        myLinkedList.display();
        System.out.println(myLinkedList.contains(-1));
        myLinkedList.remove(100);
        myLinkedList.display();
        myLinkedList.removeAllKey(0);
        myLinkedList.display();
        myLinkedList.clear();
        myLinkedList.display();
    }
}
